package com.yisu.expressway.manager.core.service;

import com.yisu.expressway.ewf.common.web.EasyUIGrid;
import com.yisu.expressway.ewf.entity.OrderMain;
import com.yisu.expressway.ewf.entity.OrderSub;
import com.yisu.expressway.manager.domain.request.OrderRequest;

import java.util.List;

/**
 * User: 赵杰
 * Date: 2017/5/8
 * Time: 16:54
 * Desc: 订单相关业务接口.
 */
public interface IOrderService {

    /**
     * 分页获取订单列表信息
     * @param orderRequest
     * @return
     */
    EasyUIGrid<OrderMain> getOrderMainListByPage(OrderRequest orderRequest);


    /**
     * 通过订单编号获取订单主信息
     * @param orderId
     * @return
     */
    OrderMain getOrderMainByOrderId(long orderId);

    /**
     * 通过订单编号获取订单子表信息
     * @param orderId
     * @return
     */
    List<OrderSub> getOrderSubByOrderId(long orderId);

    /**
     * 编辑订单主表信息
     * @param orderMain
     * @return
     */
    boolean modifyOrderMain(OrderMain orderMain);

    /**
     * 取消订单
     * @param orderMain 订单
     * @return 成功，失败
     */
    boolean cancelOrder(OrderMain orderMain);
}
